Skip to content

Fix worktree protection detection for separate gitdir layouts#2

Open
crrowbot wants to merge 3 commits intomainfrom
rara/multica-devkit-worktree-tui-fix
Open

Fix worktree protection detection for separate gitdir layouts#2
crrowbot wants to merge 3 commits intomainfrom
rara/multica-devkit-worktree-tui-fix

Conversation

@crrowbot
Copy link
Copy Markdown
Collaborator

@crrowbot crrowbot commented Apr 13, 2026

Summary

  • detect main vs linked worktrees from resolved gitdir metadata instead of checking whether the .git path is a directory
  • keep main checkouts created with the separate-git-dir layout protected from clean and nuke flows
  • add regression coverage for main worktrees whose .git is a file

Validation

  • gofmt -w internal/worktree/git.go internal/worktree/git_test.go
  • go test ./internal/worktree/...
  • go test ./...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant